<%--
  Created by IntelliJ IDEA.
  User: axing
  Date: 2019/11/14
  Time: 下午1:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.util.ArrayList" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理所有线上商品</title>
    <style>
        .c_photo img{
            width: 200px;
            height: 200px;
        }
        .comm_box{
            width: 25%;
            float: left;
        }
    </style>
</head>
<body>
<%@include file="header.jsp"%>
欢迎进入商品管理平台！<br>
<table>
    <a href="uploadCommodity.jsp" style="text-decoration: none">
        <input type="button" value="添加商品">
    </a>
    <a href="comShow.do" style="text-decoration: none">
        <input type="button" value="商品购买">
    </a>
    <c:forEach items="${sessionScope.commodities}" var="c">
    <div class="comm_box">
        <br><br><br>
        <div class="c_photo"><img src="${c.photo}"><br>
            商品编号:${c.cid}
            商品剩余数量:${c.number}
            <br>商品价格:${c.price}
            商品名称:${c.c_name}<br>
        </div>
        <br>
        <a href="commodityDit.do?cid=${c.cid}"><input type="button" value="编辑该商品"><br>
        </a><a href="commodityDelete.do?cid=${c.cid}"><input type="button" value="下架该商品"></a>
        </div>
    </c:forEach>
</table>
</body>
</html>